import Item

class Visitor:
    def visit(self,item:Item.Book):
        pass

class Cashier(Visitor):
    def __init__(self):
        self.totalForCart = 0.0

    def visit(self,item:Item.Book):
        if item.getPrice()<10.0:
            self.totalForCart+=item.getPrice()
        else:
            self.totalForCart+=(item.getPrice()*0.8)
    
    def getTotal(self):
        return self.totalForCart